<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">

    {% block title %}
    <title>BookShop</title>
    {% endblock %}

    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Favicon -->
    <link rel="shortcut icon" type="image/x-icon" href="../../static/myhome/img/favicon.png">

    <!-- all css here -->
    <!-- bootstrap v3.3.6 css -->
    <link rel="stylesheet" href="/static/myhome/css/bootstrap.min.css">
    <!-- animate css -->
    <link rel="stylesheet" href="/static/myhome/css/animate.css">
    <!-- meanmenu css -->
    <link rel="stylesheet" href="/static/myhome/css/meanmenu.min.css">
    <!-- owl.carousel css -->
    <link rel="stylesheet" href="/static/myhome/css/owl.carousel.css">
    <!-- font-awesome css -->
    <link rel="stylesheet" href="/static/myhome/css/font-awesome.min.css">
    <!-- flexslider.css-->
    <link rel="stylesheet" href="/static/myhome/css/flexslider.css">
    <!-- chosen.min.css-->
    <link rel="stylesheet" href="/static/myhome/css/chosen.min.css">
    <!-- style css -->
    <link rel="stylesheet" href="/static/myhome/style.css">
    <!-- responsive css -->
    <link rel="stylesheet" href="/static/myhome/css/responsive.css">
    <!-- modernizr css -->
    <script src="/static/myhome/js/vendor/modernizr-2.8.3.min.js"></script>
</head>

<body class="home-4">

    <!-- Add your site or application content here -->
    <!-- header-area-start -->
    <header>
        <!-- header-top-area-start -->
        <div class="header-top-area">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                        <div class="account-area text-right">
                            <ul>
                                {% if request.session.vipUser %}
                                    <li><a href="">用户：{{ request.session.vipUser.username }}</a></li>
                                    <li><a href="{% url 'myhome_logout' %}?nextpath={{ request.path }}">退出登陆</a></li>
                                {% else %}
                                    <li><a href="{% url 'myhome_login' %}?nextpath={{ request.path }}">登陆</a></li>
                                    <li><a href="{% url 'myhome_register' %}">注册</a></li>
                                {% endif %}
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- header-top-area-end -->
        <!-- header-mid-area-start -->
        <div class="header-mid-area ptb-40">
            <div class="container">
                <div class="row">
                    <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12">
                        <div class="logo-area">
                            <a href="index.html"><img src="/static/myhome/img/logo/3.png" alt="logo" /></a>
                        </div>
                    </div>
                    <!-- 顶部搜索栏 -->
                    <div class="col-lg-6 col-md-6 col-sm-5 col-xs-12">
                        <div class="header-search">
                            <form action="{% url 'myhome_search' %}">
                                <input type="text" name="keywords" value="{{ request.GET.keywords }}" placeholder="输入部分书名或作者名进行搜索" />
                                <a href="javascript:void(0)" id="search"><i class="fa fa-search"></i></a>
                            </form>
                        </div>
                    </div>
                    <!-- 购物车入口 -->
                    <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
                        <div class="my-cart">
                            <ul>
                                <li>
                                    <a href="{% url 'myhome_cartindex' %}"><i class="fa fa-shopping-cart"></i>购物车</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- header-mid-area-end -->
        <!-- main-menu-area-start -->
        <div class="main-menu-area hidden-sm hidden-xs" id="header-sticky">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="menu-area">
                            <nav>
                                <ul>
                                    <li class="active">
                                        <a href="{% url 'myhome_index' %}">首页</a>
                                    </li>
                                    <li>
                                        <a href="{% url 'myhome_index' %}">所有分类<i class="fa fa-angle-down"></i>
                                        </a>
                                        <div class="mega-menu">
                                        {% for i in classify %}
                                            <span>
                                                <a href="{% url 'myhome_category' i.id %}" class="title">{{ i.name }}</a>
                                                {% for ii in i.sub %}
                                                    <a href="{% url 'myhome_category' ii.id %}">{{ ii.name }}</a>
                                                {% endfor %}
                                            </span>
                                        {% endfor %}
                                        </div>
                                    </li>
                                {% for i in classify %}
                                    <li><a href="{% url 'myhome_category' i.id %}">{{ i.name }}<i class="fa fa-angle-down"></i></a>
                                        <div class="mega-menu">
                                        {% for ii in i.sub %}
                                            <span>
                                                <a href="{% url 'myhome_category' ii.id %}" class="title">{{ ii.name }}</a>
                                                {% for iii in ii.books_set.all %}
                                                    <a href="{% url 'myhome_bookdetails' iii.id %}">{{ iii.title }}</a>
                                                {% endfor %}
                                            </span>
                                        {% endfor %}
                                        </div>
                                    </li>
                                {% endfor %}
                                    <li><a href="{% url 'myhome_contact' %}">联系我们</a></li>
                                </ul>
                            </nav>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- main-menu-area-end -->
    </header>
    <!-- header-area-end -->

    {% block con %}

    {% endblock %}

    <!-- footer-area-start -->
    <footer>
        <!-- footer-top-start -->
        <div class="footer-top">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="footer-top-menu bb-2">
                            <nav>
                                <ul>
                                    <li><a href="#">首页</a></li>
                                    <li><a href="#">启用Cookies</a></li>
                                    <li><a href="#">隐私和Cookie政策</a></li>
                                    <li><a href="#">联系我们</a></li>
                                </ul>
                            </nav>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- footer-top-start -->
        <!-- footer-mid-start -->
        <div class="footer-mid ptb-50">
            <div class="container">
                <div class="row">
                    <div class="col-lg-8 col-md-8 col-sm-12">
                        <div class="row">
                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
                                <div class="single-footer br-2 xs-mb">
                                    <div class="footer-title mb-20">
                                        <h3>产品</h3>
                                    </div>
                                    <div class="footer-mid-menu">
                                        <ul>
                                            <li><a href="about.html">会员优惠</a></li>
                                            <li><a href="#">产品上新</a></li>
                                            <li><a href="#">服务协议</a></li>
                                            <li><a href="#">发票制度</a></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
                                <div class="single-footer br-2 xs-mb">
                                    <div class="footer-title mb-20">
                                        <h3>公司</h3>
                                    </div>
                                    <div class="footer-mid-menu">
                                        <ul>
                                            <li><a href="contact.html">联系我们</a></li>
                                            <li><a href="#">网站地图</a></li>
                                            <li><a href="#">线下商店</a></li>
                                            <li><a href="#">官方账号</a></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
                                <div class="single-footer br-2 xs-mb">
                                    <div class="footer-title mb-20">
                                        <h3>您的账户</h3>
                                    </div>
                                    <div class="footer-mid-menu">
                                        <ul>
                                            <li><a href="#">个人信息</a></li>
                                            <li><a href="#">收货地址</a></li>
                                            <li><a href="#">订单详情</a></li>
                                            <li><a href="#">注册账号</a></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-12">
                        <div class="single-footer mrg-sm">
                            <div class="footer-title mb-20">
                                <h3>我的信息</h3>
                            </div>
                            <div class="footer-contact">
                                <p class="adress">
                                    广东省深圳市南山区xx路xx号
                                </p>
                                <p><span>电话：</span> 13414948453</p>
                                <p><span>邮箱：</span> tangweigirl@163.com</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- footer-mid-end -->
        <!-- footer-bottom-start -->
        <div class="footer-bottom">
            <div class="container">
                <div class="row bt-2">
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                        <div class="copy-right-area">
                            <p>Copyright ©<a href="http://www.bootstrapmb.com/">Koparion</a>. All Right Reserved.</p>
                        </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                        <div class="payment-img text-right">
                            <a href="#"><img src="/static/myhome/img/1.png" alt="payment" /></a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- footer-bottom-end -->
    </footer>
    <!-- footer-area-end -->
    <!-- Modal -->

    <!-- Modal end -->


    <!-- all js here -->
    <!-- jquery latest version -->
    <script src="/static/myhome/js/vendor/jquery-1.12.0.min.js"></script>
    <!-- bootstrap js -->
    <script src="/static/myhome/js/bootstrap.min.js"></script>
    <!-- owl.carousel js -->
    <script src="/static/myhome/js/owl.carousel.min.js"></script>
    <!-- meanmenu js -->
    <script src="/static/myhome/js/jquery.meanmenu.js"></script>
    <!-- wow js -->
    <script src="/static/myhome/js/wow.min.js"></script>
    <!-- jquery.parallax-1.1.3.js -->
    <script src="/static/myhome/js/jquery.parallax-1.1.3.js"></script>
    <!-- jquery.countdown.min.js -->
    <script src="/static/myhome/js/jquery.countdown.min.js"></script>
    <!-- jquery.flexslider.js -->
    <script src="/static/myhome/js/jquery.flexslider.js"></script>
    <!-- chosen.jquery.min.js -->
    <script src="/static/myhome/js/chosen.jquery.min.js"></script>
    <!-- jquery.counterup.min.js -->
    <script src="/static/myhome/js/jquery.counterup.min.js"></script>
    <!-- waypoints.min.js -->
    <script src="/static/myhome/js/waypoints.min.js"></script>
    <!-- plugins js -->
    <script src="/static/myhome/js/plugins.js"></script>
    <!-- main js -->
    <script src="/static/myhome/js/main.js"></script>

    <script>
        // 给搜索的a标签绑定单击事件
        $('#search').click(function(){
            // 找到对应的表单，触发表单事件
            $(this).parents('form').submit()
        })

    </script>

{% block myjs %}

{% endblock %}
</body>
</html>
